package com.cfl.ticket.service;

import java.util.ArrayList;

import com.cfl.model.City;
import com.cfl.model.Ticket;
import com.cfl.model.TicketNumber;
import com.cfl.utils.AppResponse;

public interface TicketService {

	/**
	 * 获取我的车票
	 * @param uid	用户uid
	 * @param page	第page页
	 * @return
	 * @throws Exception
	 */
	public ArrayList<Ticket> findMyTickets(String uid, Integer page) throws Exception;
	
	/**
	 * 获取车次
	 * @param number 车次
	 * @return
	 * @throws Exception
	 */
	public TicketNumber findTicketnumberByNumber(String number) throws Exception;
	
	/**
	 * 获取车次
	 * @param tid 车次tid
	 * @return
	 * @throws Exception
	 */
	public TicketNumber findTicketnumberByTid(String tid) throws Exception;
		
	/**
	 * 获取所有车次
	 * @return
	 * @throws Exception
	 */
	public ArrayList<TicketNumber> findTicketnumberByAll() throws Exception;
	
	/**
	 * 添加车票
	 * @param ticket
	 * @throws Exception
	 */
	public AppResponse addTicket(Ticket ticket) throws Exception;
}
